<template>
    <div style=" height: 2000px; padding: 2em;">
        <h1>欢迎页</h1>
        <div>当前用户:{{ store.user.userTel }} - {{ store.user.userName }}</div>
        <div>
            <el-avatar :size="200" :src="store.user.userImg"
                style="margin:2rem; box-shadow: 0 0 1rem #333; border: 2px solid #FFF;" />
        </div>
        <div>
            <w-my-pwd v-model:open="open.pwd"></w-my-pwd>
            <w-my-update v-model:open="open.update"></w-my-update>
            <el-button @click="open.pwd=true;">修改登录密码</el-button>
            <el-button @click="open.update=true;">修改个人信息</el-button>
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { userStore } from '@/store/user';

import WMyUpdate from '@/components/WMyUpdate.vue';
import WMyPwd from '@/components/WMyPwd.vue';

const open = ref({ update: false, pwd: false });

const store = userStore();

</script>

<style scoped>

</style>